<template>
  <div id="client">
    <p style="width: 120%">
      客户：<el-input
        style="width: 100px; margin-left: 10px; margin-right: 20px"
        placeholder="请输入客户"
        v-model="input"
        clearable
      ></el-input>
      <el-button
        style="margin-left: -20px; margin-right: 10px"
        @click="dialogFormVisible = true"
        >...</el-button
      >
      &nbsp;&nbsp;&nbsp; 销售人员
      <el-select v-model="value" placeholder="销售人员" style="width: 100px">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option> </el-select
      >&nbsp;&nbsp;&nbsp;
      <span class="demonstration">单据日期：</span>
      <el-date-picker
        v-model="value3"
        type="datetime"
        placeholder="选择日期时间"
        default-time="12:00:00"
      >
      </el-date-picker
      >&nbsp;&nbsp;&nbsp;
      <span class="demonstration">交货日期：</span>
      <el-date-picker
        v-model="value2"
        type="datetime"
        placeholder="选择日期时间"
        default-time="12:00:00"
      >
      </el-date-picker
      >&nbsp;&nbsp;&nbsp; 地址
      <el-select v-model="value" placeholder="地址" style="width: 100px">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option> </el-select
      >&nbsp;&nbsp;&nbsp;
    </p>
    <el-divider></el-divider>
    <div style="margin-bottom: 20px; margin-right: 20px; float: right">
      <el-button>保存</el-button>&nbsp;&nbsp;&nbsp;
      <el-button type="primary">提交</el-button>&nbsp;&nbsp;&nbsp;
      <el-button type="success">审核</el-button>&nbsp;&nbsp;&nbsp;
      <el-button>反审核</el-button>&nbsp;&nbsp;&nbsp;
      <el-button type="primary">批量导入</el-button>&nbsp;&nbsp;&nbsp;
    </div>
    <div style="margin-top: 30px">
      <el-table
        height="250px"
        :data="tableData"
        border
        style="width: 100%; font-size: 13px"
      >
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column fixed prop="date" label="商品" width="230">
          <el-input
            style="width: 120px; margin-left: 10px; margin-right: 20px"
            placeholder="请输入商品"
            v-model="spid"
            clearable
          ></el-input>
          <el-button
            style="margin-left: -20px; margin-right: 10px; width: 50px"
            @click="dialogFormVisible1 = true"
            >...</el-button
          >
        </el-table-column>
<<<<<<< HEAD
=======
        <el-table-column prop="goodname" label="商品名称" width="120">
        </el-table-column>
        <el-table-column prop="imagename" label="图片" width="120">
        </el-table-column>
        <el-table-column prop="unitid" label="基本单位" width="120">
        </el-table-column>
        <el-table-column prop="num" label="基本数量" width="120">
        </el-table-column>
        <el-table-column prop="warehouseid" label="仓库" width="120">
        </el-table-column>
>>>>>>> 6be95d2b3200ab6fbb17d1e0a5a9b367f780cc8e
        <el-table-column prop="name" label="商品名称" width="120">
        </el-table-column>
        <el-table-column prop="picture" label="图片" width="120">
        </el-table-column>
        <el-table-column prop="jd" label="基本单位" width="120">
        </el-table-column>
        <el-table-column prop="num" label="基本数量" width="120">
        </el-table-column>
        <el-table-column prop="ck" label="仓库" width="120"> </el-table-column>
        <el-table-column prop="initPrice" label="报价单价" width="120">
        </el-table-column>
        <el-table-column prop="taxedPrice" label="折后含税单价" width="120">
        </el-table-column>
        <el-table-column label="交货日期" width="200"
          ><el-date-picker
            v-model="date"
            type="date"
            placeholder="请选择"
            style="width: 120px; margin-left: 10px; margin-right: 20px"
            clearable
          >
          </el-date-picker
        ></el-table-column>
        <el-table-column prop="discount" label="折扣率" width="120">
        </el-table-column>
        <el-table-column prop="tax" label="税率" width="120"> </el-table-column>
        <el-table-column prop="lastPrice" label="价税合计" width="120">
        </el-table-column>
        <el-table-column prop="buyOrders" label="关联购货订单号" width="120">
        </el-table-column>
        <el-table-column prop="noGo" label="未出库数量" width="120">
        </el-table-column>
        <el-table-column prop="text" label="备注" width="120">
        </el-table-column>
      </el-table>
      <div style="width: 100%; background-color: blanchedalmond; height: 30px">
        <table style="width: 78.7%; height: 30px">
          <tr>
            <td style="width: 50%">合计：</td>
            <td style="width: 50%">123</td>
          </tr>
        </table>
      </div>
      <el-input
        type="textarea"
        :rows="2"
        placeholder="暂无备注信息"
        v-model="textarea"
        style="width: 100%; line-height: 20px"
      >
      </el-input>
      <p style="margin-top: 20px; margin-left: 20px">
        优惠率：
        <el-input
          style="width: 240px; margin-left: 10px; margin-right: 20px"
          placeholder="请输入优惠率"
          v-model="input"
          clearable
        >
        </el-input
        >&nbsp;&nbsp; 优惠后金额：
        <el-input
          style="width: 240px; margin-left: 10px; margin-right: 20px"
          placeholder="请输入重量"
          v-model="input"
          clearable
        >
        </el-input
        >&nbsp;&nbsp; 交货方式：
        <el-select v-model="value" placeholder="交货方式" style="width: 100px">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </p>
      <p style="margin-top: 20px; margin-left: 20px">
        收款条件：
        <el-select v-model="value" placeholder="收款条件" style="width: 100px">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option> </el-select
        >&nbsp;&nbsp; 关联路线：
        <el-select v-model="value" placeholder="收款条件" style="width: 100px">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option> </el-select
        >&nbsp;&nbsp; 重量：<el-input
          style="width: 240px; margin-left: 10px; margin-right: 20px"
          placeholder="请输入重量"
          v-model="input"
          clearable
        >
        </el-input>
        <span style="display: inline-block; float: right">
          <el-button @click="goto('SaleOrdersList')">历史单据</el-button
          >&nbsp;&nbsp; <el-button>操作日志</el-button></span
        >
      </p>
    </div>

    <el-dialog top="20px" title="选择客户" :visible.sync="dialogFormVisible">
      <el-input
        v-model="input"
        placeholder="请输入编号或名称"
        style="width: 200px; margin-left: 20px"
      ></el-input>
      <el-checkbox v-model="checked" style="margin-left: 20px"
        >显示禁用客户</el-checkbox
      >
      <el-button type="success" style="margin-left: 20px">查询</el-button>
      <el-table :data="gridData">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column
          width="100"
          property="name"
          label="类别"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="编号"
        ></el-table-column>
        <el-table-column
          width="300"
          property="address"
          label="名称"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="联系人"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="手机"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="备注"
        ></el-table-column>
      </el-table>
      <div class="block">
        <span class="demonstration"></span>
        <el-pagination layout="prev, pager, next" :total="1000">
        </el-pagination>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false"
          >确 定</el-button
        >
      </div>
    </el-dialog>

    <el-dialog top="20px" title="选择商品" :visible.sync="dialogFormVisible1">
      <el-input
        v-model="spid"
        placeholder="请输入编号或名称"
        style="width: 200px; margin-left: 20px"
      ></el-input
      >&nbsp;&nbsp; 仓库：<el-select
        v-model="ckid"
        placeholder="请选择"
        style="width: 100px"
      >
        <el-option
          v-for="item in ck"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>
      <el-checkbox v-model="checked" style="margin-left: 20px"
        >显示禁用商品</el-checkbox
      >
      <el-button type="success" style="margin-left: 20px">查询</el-button>
      <el-table :data="gridData1">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column width="100" label="图片"></el-table-column>
        <el-table-column
          width="100"
          property="goodsId"
          label="商品编号"
        ></el-table-column>
        <el-table-column
          width="300"
          property="address"
          label="产地"
        ></el-table-column>
        <el-table-column
          width="100"
          property="property"
          label="辅助属性编号"
        ></el-table-column>
        <el-table-column
          width="100"
          property="name"
          label="商品名称"
        ></el-table-column>
        <el-table-column
          width="100"
          property="model"
          label="规格型号"
        ></el-table-column>
        <el-table-column
          width="100"
          property="type"
          label="商品类别"
        ></el-table-column>
        <el-table-column
          width="100"
          property="danwei"
          label="单位"
        ></el-table-column>
        <el-table-column
          width="100"
          property="kc"
          label="库存"
        ></el-table-column>
        <el-table-column
          width="100"
          property="text"
          label="备注"
        ></el-table-column>
      </el-table>
      <div class="block">
        <span class="demonstration"></span>
        <el-pagination layout="prev, pager, next" :total="1000">
        </el-pagination>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible1 = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible1 = false"
          >确 定</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "SaleOrders",
  data() {
    return {
      gridData1: [
        {
          text: "备注",
          kc: "默认仓库",
          danwei: "个",
          type: "水果",
          model: "规格型号",
          name: "库尔勒香梨",
          address: "产地",
          goodsId: "123",
        },
        {
          text: "备注",
          kc: "默认仓库",
          danwei: "个",
          type: "水果",
          model: "规格型号",
          name: "库尔勒香梨",
          address: "产地",
          goodsId: "123",
        },
        {
          text: "备注",
          kc: "默认仓库",
          danwei: "个",
          type: "水果",
          model: "规格型号",
          name: "库尔勒香梨",
          address: "产地",
          goodsId: "123",
        },
        {
          text: "备注",
          kc: "默认仓库",
          danwei: "个",
          type: "水果",
          model: "规格型号",
          name: "库尔勒香梨",
          address: "产地",
          goodsId: "123",
        },
        {
          text: "备注",
          kc: "默认仓库",
          danwei: "个",
          type: "水果",
          model: "规格型号",
          name: "库尔勒香梨",
          address: "产地",
          goodsId: "123",
        },
        {
          text: "备注",
          kc: "默认仓库",
          danwei: "个",
          type: "水果",
          model: "规格型号",
          name: "库尔勒香梨",
          address: "产地",
          goodsId: "123",
        },
      ],
      dialogFormVisible1: false,
      input: "",
      value2: "",
      value3: "",
      dialogFormVisible: false,
      gridData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
      ],
      tableData: [
        {
          buyOrders: "666666",
          noGo: 20,
          name: "库尔勒香梨",
          pricture: "",
          jd: "个",
          num: "100",
          ck: "默认仓库",
          initPrice: 8,
          taxedPrice: 4,
          discount: 0.5,
          tax: 0.1,
          lastPrice: 3.6,
          text: "备注",
        },
      ],
      options: [
        {
          value: "选项1",
          label: "黄金糕",
        },
        {
          value: "选项2",
          label: "双皮奶",
        },
        {
          value: "选项3",
          label: "蚵仔煎",
        },
        {
          value: "选项4",
          label: "龙须面",
        },
        {
          value: "选项5",
          label: "北京烤鸭",
        },
      ],
    };
  },
  methods: {
    goto(to) {
      this.$router.push(to);
    },
  },
};
</script>

<style scoped>
.el-button el-button--default el-popover__reference {
  margin-right: 20px;
}

tr {
  border: 1px solid black;
}
</style>